<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<meta name="viewport" content="width=device-width, initial-scale=1.0">
	<title>vue源码研究之指令</title>
	<script src="/xuni/bundle.js"></script>

</head>
<body>
	<div id="app">
	    你好{{m.n.k}}
	    <input type="text" v-model='m.n.k'>
		<div class="box" v-if="8>0">
			<ul>
				<li>A</li>
				<li>B</li>
				<li>C</li>
			</ul>
			<button onclick='addNum()'>+1</button>
		</div>
	</div>
	<script>
		let vm = new Vue({
			el:'#app',
			data:{
				a:10,
				m:{
					n:{
						k:88888
					}
				},
				p:{
					o:99
				}
			},
			watch:{
				a(){
					console.log('a被watcher了且被触发了')
				},
	            m(){
						console.log('a被watcher了且被触发了')
					}				
				}
		});



		var addNum=()=>{
			vm.m.n.k++
		}
	</script>
	
</body>
</html>